<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    body {
      background-color: black;
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .card {
      width: 220px;
      height: 120px;
      color: #ffffff;
      text-align: center;
      line-height: 100px;
      font-size: 28px;
      border-radius: 10px;
      position: relative;
      /* background: yellowgreen; */
      overflow: hidden;
    }

    .card::before {
      content: '';
      position: absolute;
      left: -50%;
      top: -50%;
      width: 200%;
      height: 200%;
      border-radius: 10px;
      background-image: conic-gradient(transparent, #ffffff, transparent 30%);
      z-index: -2;
      animation: rotation 4s linear infinite;
    }

    .card::after {
      content: '';
      position: absolute;
      --g: 4px;
      width: calc(100% - var(--g) * 2);
      height: calc(100% - var(--g) * 2);
      background: #000;
      left: var(--g);
      top: var(--g);
      border-radius: inherit;
      z-index: -1;
      opacity: 0.9;
    }

    @keyframes rotation {
      to {
        transform: rotate(360deg);
      }
    }
  </style>
</head>

<body>
  <div class="card">
    流光边框
  </div>
</body>

</html>